package cn.cvs.pojo;

import org.apache.ibatis.type.Alias;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.Pattern;
import java.util.Date;
import java.util.List;

/**
 * 供货商表
 */
@Alias("supplier")
public class Supplier implements java.io.Serializable {
    private Integer id;//ID
    @NotEmpty(message = "供应商编码不能为空")
    private String supCode;//供货商编号
    @NotEmpty(message = "供货商名称不能为空")
    private String supName;//供货商名称
    private String supDesc;//供货商描述
    @NotEmpty(message = "联系人不能为空")
    private String supContact;//供货商联系人
    @Pattern(regexp = "^(13[0-9]|15[0-9]|18[0-9])\\d{8}$")
    private String supPhone;//联系电话
    private String supAddress;//供货商地址
    private String supFax;//传真
    private Integer createdUserId;//创建人id
    private Date createdTime;//创建时间
    private Date updatedTime;//修改时间
    private Integer updatedUserId;//修改人id
    private List<StorageRecord> storageRecords;//入库记录
    private String companyLicPicPath;//企业营业执照的存储路径
    private String orgCodePicPath;//组织机构代码证的存储路径
    private String idPicPath;
    private String workPicPath;

    public String getIdPicPath() {
        return idPicPath;
    }

    public void setIdPicPath(String idPicPath) {
        this.idPicPath = idPicPath;
    }

    public String getWorkPicPath() {
        return workPicPath;
    }

    public void setWorkPicPath(String workPicPath) {
        this.workPicPath = workPicPath;
    }

    public void setCreatedUserId(Integer createdUserId) {
        this.createdUserId = createdUserId;
    }

    public String getCompanyLicPicPath() {
        return companyLicPicPath;
    }

    public void setCompanyLicPicPath(String companyLicPicPath) {
        this.companyLicPicPath = companyLicPicPath;
    }

    public String getOrgCodePicPath() {
        return orgCodePicPath;
    }

    public void setOrgCodePicPath(String orgCodePicPath) {
        this.orgCodePicPath = orgCodePicPath;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getSupCode() {
        return supCode;
    }

    public void setSupCode(String supCode) {
        this.supCode = supCode;
    }

    public String getSupName() {
        return supName;
    }

    public void setSupName(String supName) {
        this.supName = supName;
    }

    public String getSupDesc() {
        return supDesc;
    }

    public void setSupDesc(String supDesc) {
        this.supDesc = supDesc;
    }

    public String getSupContact() {
        return supContact;
    }

    public void setSupContact(String supContact) {
        this.supContact = supContact;
    }

    public String getSupPhone() {
        return supPhone;
    }

    public void setSupPhone(String supPhone) {
        this.supPhone = supPhone;
    }

    public String getSupAddress() {
        return supAddress;
    }

    public void setSupAddress(String supAddress) {
        this.supAddress = supAddress;
    }

    public String getSupFax() {
        return supFax;
    }

    public void setSupFax(String supFax) {
        this.supFax = supFax;
    }

    public Integer getCreatedUserId() {
        return createdUserId;
    }

    public void setCreateUserId(Integer createdUserId) {
        this.createdUserId = createdUserId;
    }

    public Date getCreatedTime() {
        return createdTime;
    }

    public void setCreatedTime(Date createdTime) {
        this.createdTime = createdTime;
    }

    public Date getUpdatedTime() {
        return updatedTime;
    }

    public void setUpdatedTime(Date updatedTime) {
        this.updatedTime = updatedTime;
    }

    public Integer getUpdatedUserId() {
        return updatedUserId;
    }

    public void setUpdatedUserId(Integer updatedUserId) {
        this.updatedUserId = updatedUserId;
    }

    public List<StorageRecord> getStorageRecords() {
        return storageRecords;
    }

    public void setStorageRecords(List<StorageRecord> storageRecords) {
        this.storageRecords = storageRecords;
    }


    @Override
    public String toString() {
        return "Supplier{" +
                "id=" + id +
                ", supCode='" + supCode + '\'' +
                ", supName='" + supName + '\'' +
                ", supDesc='" + supDesc + '\'' +
                ", supContact='" + supContact + '\'' +
                ", supPhone='" + supPhone + '\'' +
                ", supAddress='" + supAddress + '\'' +
                ", supFax='" + supFax + '\'' +
                ", createdUserId=" + createdUserId +
                ", createdTime=" + createdTime +
                ", updatedTime=" + updatedTime +
                ", updatedUserId=" + updatedUserId +
                ", storageRecords=" + storageRecords +
                ", companyLicPicPath='" + companyLicPicPath + '\'' +
                ", orgCodePicPath='" + orgCodePicPath + '\'' +
                ", idPicPath='" + idPicPath + '\'' +
                ", workPicPath='" + workPicPath + '\'' +
                '}';
    }
}
